import React, { Component } from 'react'
import { Map } from "immutable";

// export default class immutableCom extends Component {

    const obj = {
        name: 'kerwin',
        age: 100
    }
//   render() {
//     return (
//       <div>immutableCom</div>
//     )
//   }
// }
    // get获取immutable
    // set设置immutable
    const oldImmObj = Map(obj) // Map {size: 2, _root: ArrayMapNode, __ownerID: undefined, __hash: undefined, __altered: false}
    const newImmobj = oldImmObj.set('name', 'xiaoming')
    console.log(oldImmObj, newImmobj)

    // immutabl =》 普通对象

    console.log(oldImmObj.toJS(), newImmobj.toJS())
